import {LabLayout} from "../../enums/StoreEnums"

const LabBreadcrumbsModule = {
    state: {
        breadcrumbs: {}
    },
    mutations: {
        [LabLayout.Mutations.SET_BREADCRUMB](state, payload) {
            state.breadcrumbs = payload
        }
    },
    actions: {
        [LabLayout.Actions.SET_BREADCRUMB]({commit}, payload) {
            commit(LabLayout.Mutations.SET_BREADCRUMB, payload)
        }
    },
    getters: {
        breadcrumbs: (state) => state.breadcrumbs,
        pageBreadcrumbPath: (state) => state.breadcrumbs.path,
        pageTitle: (state) => state.breadcrumbs.title
    }
}
export default LabBreadcrumbsModule